<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2d转换中心点</title>
    <style>
        /* 2d-transform-origin: 50% 50%; */
        .box {
            width: 200px;
            height: 200px;
            background-color: #f00;
            margin: 100px auto;
            /* transform: rotate(45deg); */
            transition: all 1s;
            /*默认 transform-origin: 50% 50%; */
            transform-origin: left bottom;
            /* transform-origin: 50px 50px ;也可以用像素*/
        }

        .box:hover {
            transform: rotate(360deg);
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>